<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="css/element.css" rel="stylesheet"/>
    <link href="css/styleindex.css" rel="stylesheet"/>
    <style>

    </style>
</head>
<body style="background: #ffffff;box-shadow:inset 0px 15px 10px -15px #ccc; ">

  <div class="mui-content">
    <div id="vm" class="x-examok" v-cloak>
      <div class="x-btn-form x-work1-btn" style="margin:0;box-shadow:inset 0px 15px 10px -15px #ccc;">
        <div class="x-st-btn" @click="api.openWin({name:'dutyplancheck',url:'./dutyadmin/dutyplancheck.html'})">
          <div class="x-stbtn-img x-work2-img1"></div>
          <div class="x-stbtn-tit">值班计划检查</div>
        </div>
        <div class="x-st-btn" @click="api.openWin({name:'classgroupmeet',url:'./classgroupmeetadmin/classgroupmeet.html'})">
          <div class="x-stbtn-img x-work2-img2"></div>
          <div class="x-stbtn-tit">班组会</div>
        </div>
        <div class="x-st-btn" @click="api.openWin({name:'classgroupcheck',url:'./classgroupcheck/classgroupcheck.html'})">
          <div class="x-stbtn-img x-work2-img3"></div>
          <div class="x-stbtn-tit">班组检查</div>
        </div>
        <div class="x-st-btn" @click="api.openWin({name:'customerfeed',url:'./customerfeed/customerfeed.html'})">
          <div class="x-stbtn-img x-work2-img4"></div>
          <div class="x-stbtn-tit">记录顾客反馈</div>
        </div>
        <div class="x-st-btn" @click="gouseradmin('tomeet','./tomeetadmin/tomeet.html','opentomeetgroupframe')">
          <div class="x-stbtn-img x-work2-img5"></div>
          <div class="x-stbtn-tit">碰头会</div>
        </div>
        <div class="x-st-btn" @click="api.openWin({name:'closesavecheck',url:'./closesavecheck/closesavecheck.html'})">
          <div class="x-stbtn-img x-work2-img6"></div>
          <div class="x-stbtn-tit">打烊安全检查</div>
        </div>
        <!-- <div class="x-st-btn">
          <div class="x-stbtn-img x-work2-img7"></div>
          <div class="x-stbtn-tit">岗位评价</div>
        </div> -->
      </div>
    </div>
  </div>

  <script type="text/javascript" src="./script/vue.js"></script>
  <script type="text/javascript" src="./script/element.js"></script>
  <script type="text/javascript" src="./script/api.js"></script>
  <script type="text/javascript" src="./script/base.js"></script>
	<script>
apiready = function () {
    var iostoph = api.safeArea.top+80;


    //
    var vm = new Vue({
      el:'#vm',
      data(){
        return{

        }
      },
      created:function() {
        var that=this;


      },
      mounted:function(){
        var that=this;

      },
      methods: {
        //打开tabs
        gouseradmin:function(tabshtmlname,tabshtmlurl,framegroupname){
          let that=this;
          that.opentabs(tabshtmlname,tabshtmlurl)
          that.openuseradminframegroup(framegroupname)
        },
        opentabs:function(tabshtmlname,tabshtmlurl){
          api.openFrame({
            name:tabshtmlname,
            url:tabshtmlurl,
            bounces: false,
            rect: { // 推荐使用Margin布局，用于适配屏幕的动态变化
              marginLeft:0,    //相对父页面左外边距的距离，数字类型
              marginTop:0,     //相对父页面上外边距的距离，数字类型
              marginBottom:0,  //相对父页面下外边距的距离，数字类型
              marginRight:0    //相对父页面右外边距的距离，数字类型
            }
          })
        },
        openuseradminframegroup:function(framegroupname){
            userframes = [{
                name: 'tomeettabs1',
                url: './tomeetadmin/tomeettabs1.html',
                bgColor: '#fff',
                bounces:false,
                pageParam:{
                  fromtabs:'1'
                }
            },  {
                name: 'tomeettabs2',
                url: './tomeetadmin/tomeettabs2.html',
                bgColor: '#fff',
                bounces:false,
                pageParam:{
                  fromtabs:'2'
                }
            }]
          api.openFrameGroup({
              name: framegroupname,
              background: '#fff',
              rect: {
                 marginLeft:0,
                 marginTop:iostoph,
                 marginBottom:0,
                 marginRight:0
              },
              frames: userframes,
              preload:0,
              index:0,
              scrollEnabled:false//滑动
          }, function(ret, err) {
              if(ret){
                if (ret.index > -1) {
                    setTimeout(function(){
                      api.execScript({
                          frameName: 'tomeet',
                          script: 'fnNvnsetSelected("' + ret.index + '");'
                      });
                    },500)

                }
              }
          });
        },
      }
    })
	}
  function fnsetFrameGroupIndex(name, index) {
      api.setFrameGroupIndex({
          name: name,
          index: index,
          scroll: true
      });
  }

	</script>
</body>
</html>
